﻿<Window x:Class="WpfConsole.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:WpfConsole"
        Title="WpfConsole" Height="480" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
            <Button Name="NewTabBtn" Click="NewTabBtn_Click" >New Tab</Button>
            <Button Name="CloseBtn" Click="CloseBtn_Click">Close</Button>
        </StackPanel>
        <Grid Grid.Row="0" Grid.Column="1" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="40"/>
                <ColumnDefinition Width="30"/>
                <ColumnDefinition Width="150"/>
            </Grid.ColumnDefinitions>
            <ComboBox Name="BookCommandCB" IsEditable="True" KeyDown="BookCommandCB_KeyDown" Grid.Column="0" >
                <ComboBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Delete" Click="DeleteHistory_Click" />
                    </ContextMenu>
                </ComboBox.ContextMenu>
            </ComboBox>
            <ComboBox Name="WatchDogIntervalCB" Text="5" IsEditable="True"  Grid.Column="1">
                <ComboBoxItem>5</ComboBoxItem>
                <ComboBoxItem>30</ComboBoxItem>
                <ComboBoxItem>60</ComboBoxItem>
            </ComboBox>
            <Label Grid.Column="2">Sec <!-- during debug, use seconds instead of Min --></Label>
            <StackPanel Orientation="Horizontal" Grid.Column="3">
                <Button Name="StartBtn" Click="WatchStart_Click">Watch Start</Button>
                <Button Name="StopBtn" IsEnabled="False" Click="WatchStop_Click">Stop</Button>
           </StackPanel>
        </Grid>
        <TabControl Name="TabCtrl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" SelectionChanged="TabCtrl_SelectionChanged">
            <TabItem Header="cons(1)">
                <c:ConsoleView x:Name="ConsoleVW" />
            </TabItem>
        </TabControl>
    </Grid>
</Window>
